package cn.vcjf.weapp.api.goods.entity;

import cn.vcjf.weapp.common.util.IdGen;
import cn.vcjf.weapp.common.web.PageModel;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
    * 
    * </p>
 *
 * @author zhengzihang
 * @since 2018-09-25
 */
@TableName("vc_goods_refund_order")
public class GoodsRefundOrder extends PageModel<GoodsRefundOrder> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    /**
     * vc_goods_group表主键（商品具体规格）
     */
    private Integer goodsId;

    private String refundOrder;
    /**
     * 订单类型(1,普通,2,拼团,3,砍价,4套餐)
     */
    private Integer orderType;
    /**
     * 订单物品列表
     */
    @TableField(exist = false)
    private List<GoodsOrderItem> orderItems;

    private BigDecimal refundMoney;

    private String orderNo;

    /**
     * 退款状态(1,待审核,2,已审核,3,拒绝,4申请成功,5已完成,6失败)
     */
    private Integer status;

    /**
     * 退款原因
     */
    private String reason;

    /**
     * 问题描述
     */
    private String reasonDes;

    private Integer provinceId;

    private Integer cityId;

    private Integer countryId;

    private String goodsFileId1;

    /**
     * 退款商品图片ID
     */
    private String goodsFileId2;

    /**
     * 退款商品图片
     */
    private String goodsFileId3;

    private String orderDes;

    private String orderSn;

//    @TableField(exist = false)
    private String allRes;
    /**
     * 退款类型(1,正常,2,退换,3,仅退款,4,退款退货)
     */
    private Integer refundType;

//    @TableField(exist = false)
    private String callBackRes;
    private String remarks;
    private Date auditTime;
    private String rejectReason;

    /**********************************************/

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public String getOrderDes() {
        return orderDes;
    }

    public void setOrderDes(String orderDes) {
        this.orderDes = orderDes;
    }

    public List<GoodsOrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<GoodsOrderItem> orderItems) {
        this.orderItems = orderItems;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }
    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }
    public String getRefundOrder() {
        return refundOrder;
    }

    public void setRefundOrder(String refundOrder) {
        this.refundOrder = refundOrder;
    }
    public BigDecimal getRefundMoney() {
        return refundMoney;
    }

    public void setRefundMoney(BigDecimal refundMoney) {
        this.refundMoney = refundMoney;
    }
    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }
    public String getReasonDes() {
        return reasonDes;
    }

    public void setReasonDes(String reasonDes) {
        this.reasonDes = reasonDes;
    }
    public Integer getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }
    public Integer getCityId() {
        return cityId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }
    public Integer getCountryId() {
        return countryId;
    }

    public void setCountryId(Integer countryId) {
        this.countryId = countryId;
    }
    public String getGoodsFileId1() {
        return goodsFileId1;
    }

    public void setGoodsFileId1(String goodsFileId1) {
        this.goodsFileId1 = goodsFileId1;
    }
    public String getGoodsFileId2() {
        return goodsFileId2;
    }

    public void setGoodsFileId2(String goodsFileId2) {
        this.goodsFileId2 = goodsFileId2;
    }
    public String getGoodsFileId3() {
        return goodsFileId3;
    }

    public void setGoodsFileId3(String goodsFileId3) {
        this.goodsFileId3 = goodsFileId3;
    }

    @Override
    public void preInsert(){
        super.preInsert();
        this.refundOrder = "ref"+IdGen.getOrderNo();
        this.status = 1;
        this.orderDes = "退款中";
    }
    @Override
    public void preUpdate(){
        super.preInsert();
    }
    @Override
    public String toString() {
        return "GoodsRefundOrder{" +
        "id=" + id +
        ", userId=" + userId +
        ", goodsId=" + goodsId +
        ", refundOrder=" + refundOrder +
        ", refundMoney=" + refundMoney +
        ", orderNo=" + orderNo +
        ", status=" + status +
        ", reason=" + reason +
        ", reasonDes=" + reasonDes +
        ", provinceId=" + provinceId +
        ", cityId=" + cityId +
        ", countryId=" + countryId +
        ", goodsFileId1=" + goodsFileId1 +
        ", goodsFileId2=" + goodsFileId2 +
        ", goodsFileId3=" + goodsFileId3 +
        ", createUser=" + createUser +
        ", createTime=" + createTime +
        ", updateUser=" + updateUser +
        ", updateTime=" + updateTime +
        ", deleteFlag=" + deleteFlag +
        ", sysUserId=" + sysUserId +
        "}";
    }

    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public void setAllRes(String allRes) {
        this.allRes = allRes;
    }
    @JsonIgnore
    public String getAllRes() {
        return allRes;
    }

    public Integer getRefundType() {
        return refundType;
    }

    public void setRefundType(Integer refundType) {
        this.refundType = refundType;
    }

    public void setCallBackRes(String callBackRes) {
        this.callBackRes = callBackRes;
    }
    @JsonIgnore
    public String getCallBackRes() {
        return callBackRes;
    }

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }
}
